<!DOCTYPE html>
<html class="iframe-h">

	<head>
		<meta charset="UTF-8">
		<meta name="renderer" content="webkit">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title>网站后台管理模版</title>
		<link rel="stylesheet" type="text/css" href="/../../static/admin/layui/css/layui.css" />
		<link rel="stylesheet" type="text/css" href="/../../static/admin/css/admin.css" />
	</head>

	<body>
		<div class="wrap-container clearfix">
            <div class="layui-tab" style="margin-top: 20px;">
				<ul class="layui-tab-title">
					<li><a href="/biaozhun_01/0/0/0/1">0-1标准化</a></li>
					<li class="layui-this"><a href="/score/0/0/0/1">Z-Score</a></li>
					<li><a href="/scaling/0/0/0/1">小数定标标准化</a></li>
					<li><a href="/normalization/0/0/0/1">均值归一法</a></li>
				</ul>
				<div id="main-content layui-form">
				</div>
            </div>
            <div class="column-content-detail">
                <form class="layui-form" action="">
                    <div class="layui-form-item">
                        <div class="layui-inline tool-btn">
                            数据标题：
                            <select name="title" id="title" lay-filter="title">
                                <option value="">数据标题</option>
                                {% for i in titleList%}
                                <option {% if i == args.title%} selected {% endif %} value="{{i}}">{{i}}</option>
                                {% endfor %}
                            </select>
                        </div>
                        <div class="layui-inline">
                            地区：
                            <select name="area" id="area" lay-filter="area">
                                <option value="">地区</option>
                                {% for i in sheetList%}
                                <option {%if args.name == i%} selected {% endif %} value="{{i}}">{{i}}</option>
                                {% endfor %}
                            </select>
                        </div>
                        <div class="layui-inline tool-btn">
                            <button type="button" class="layui-btn layui-btn-warm search">搜索</button>
                        </div>
                        
                    </div>
                </form>
                <div class="layui-form" id="table-list">
                    <table class="layui-table" lay-even lay-skin="nob">
                        <colgroup>
                            <col>
                            <col>
                            <col>
                            <col>
                            <col>
                            <col>
                            <col>
                            <col>
                        </colgroup>
                        <thead>
                            <tr>
                                <th>id</th>
                                <th>AQI</th>
                                <th>PM2.5</th>
                                <th>PM10</th>
                                <th>SO2</th>
                                <th>CO</th>
                                <th>NO2</th>
                                <th>O3</th>
                            </tr>
                        </thead>
                        <tbody>
                            {% for i in data%}
                                <tr>
                                    <td>{{i.date}}</td>
                                    <td>{{i.AQI}}</td>
                                    <td>{{i.dayPM25}}</td>
                                    <td>{{i.dayPM10}}</td>
                                    <td>{{i.daySO2}}</td>
                                    <td>{{i.dayCO}}</td>
                                    <td>{{i.dayNO2}}</td>
                                    <td>{{i.dayO3}}</td>
                                </tr>
                            {% endfor %}
                        </tbody>
                    </table>
                    <div class="page-wrap">
                        <ul class="pagination">
                            {% for i in range(0,args.totalpage)%}
                            <li class="{% if args.page == (i+1)%}active{% endif %}"><span><a href="/biaozhun_01/{{args.title}}/{{args.name}}/{{args.month}}/{{i+1}}">{{i+1}}</a></span></li>
                            {% endfor %}
                        </ul>
                    </div>
                    <a id="data_explode" url="/score_exp/{{args.title}}/{{args.name}}/{{args.month}}" href="javascript:;" class="layui-btn layui-btn-primary">导出数据</a>
                </div>
            </div>
		</div>
		<script src="/../../static/admin/layui/layui.js" type="text/javascript" charset="utf-8"></script>
		<script src="/../../static/admin/js/common.js" type="text/javascript" charset="utf-8"></script>
		<script>
            layui.use(['jquery','layer','form'], function() {
                var $ = layui.jquery;
                $('.search').on('click',function(){
                    var title = $('#title').val();
                    var area = $('#area').val();
                    location.href="/score/"+title+'/'+area+'/0/1'
                })
                $('#data_explode').on('click',function(){
                    var url = $(this).attr('url');
                    $.post(url,function(res){
                        location.href = '/get_attachment/'+res.url
                    },'json')
                })
            })
		</script>
	</body>

</html>